Enforce team name constraints and fix TG name overflow#88
Merged
Conversation
- Add team name validation: lowercase letters only (a-z), max 12 chars
- Rename excluded team: platform-owners → platform
- Rename registered team: platform-test-team → testteam
- Add TG name truncation+hash for names exceeding 32-char AWS limit
- Update docs with {team}-{name} naming convention
Terraform Plan🚧 Changes detected — Plan: 8 to add, 2 to change, 8 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Team configuration refactoring: renaming CI team from 'platform-test-team' to 'testteam' with corresponding IAM role and policy updates, plus Lambda function code updates.
|
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary
- Add team name validation in team provisioner: `^[a-z]{1,12}$`
(lowercase letters only, max 12 chars)
- Rename excluded team references: `platform-owners` → `platform`
everywhere
- Update registered teams: `platform-test-team` → `testteam`
- Fix ALB target group name overflow: truncate + 6-char hash suffix when
>32 chars
- Update app-yaml-reference.md with team constraints and `{team}-{name}`
naming table
## Why
The `{team}-{service}` naming pattern hits AWS limits (ALB TG: 32 chars)
with long team names. This enforces short team names at the provisioner
level and adds a safety truncation in the routing module.
## Files changed
- `terraform/lambda-src/team_provisioner/handler.py` —
`_validate_team_name()` function
- `terraform/lambda-src/ci_broker/handler.py` — excluded team →
`platform`
- `terraform/modules/service-routing/main.tf` — TG name truncation
- `scripts/*.sh`, `scripts/*.py` — excluded team → `platform`
- `.github/CODEOWNERS` — `@javaBin/platform`
- `docs/app-yaml-reference.md` — naming constraints and table
- `terraform/platform/registered-teams.auto.tfvars` — `testteam`
## IAM impact
- Terraform will destroy `javabin-ci-team-platform-test-team` and create
`javabin-ci-team-testteam`
- Same for deploy roles
## Test plan
- [ ] Merge registry PR first (team YAMLs)
- [ ] Merge this PR
- [ ] Verify platform CI passes (plan + apply)
- [ ] Merge test app PR and verify CI uses new team name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
^[a-z]{1,12}$(lowercase letters only, max 12 chars)platform-owners→platformeverywhereplatform-test-team→testteam{team}-{name}naming tableWhy
The
{team}-{service}naming pattern hits AWS limits (ALB TG: 32 chars) with long team names. This enforces short team names at the provisioner level and adds a safety truncation in the routing module.Files changed
terraform/lambda-src/team_provisioner/handler.py—_validate_team_name()functionterraform/lambda-src/ci_broker/handler.py— excluded team →platformterraform/modules/service-routing/main.tf— TG name truncationscripts/*.sh,scripts/*.py— excluded team →platform.github/CODEOWNERS—@javaBin/platformdocs/app-yaml-reference.md— naming constraints and tableterraform/platform/registered-teams.auto.tfvars—testteamIAM impact
javabin-ci-team-platform-test-teamand createjavabin-ci-team-testteamTest plan